<?php $__env->startSection('title','Добавление инструктора из списка неактивных'); ?>
<?php $__env->startSection('content'); ?>
    <?php if(count($instructors) > 0): ?>
        <div class="mt-10">
            <form action="<?php echo e(route('instructors.storeinactive')); ?>" method="POST" class="grid grid-cols-1 gap-[30px] max-w-[600px]">
                <?php echo csrf_field(); ?>
                <?php echo method_field('POST'); ?>


                <div>
                    <select name="centers_id" required>
                        <option>Выберите центр</option>
                        <?php $__currentLoopData = $centers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $center): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <option value="<?php echo e($center->id); ?>"><?php echo e($center->name); ?></option>


                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </select>
                    <?php $__errorArgs = ['centers_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <div>
                        <?php echo e($message); ?>

                    </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                </div>
                <div>
                    <select name="instructors" required>
                        <option>Выберите инструктора</option>
                        <?php $__currentLoopData = $instructors; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $instructor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <option value="<?php echo e($instructor->id); ?>"><?php echo e($instructor->name); ?></option>


                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </select>
                    <?php $__errorArgs = ['instructors'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <div>
                        <?php echo e($message); ?>

                    </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                </div>

                <input type="submit" value="Добавить" class="bg-blue-700 p-4 text-white font-bold">
            </form>
        </div>
    <?php else: ?>
        <div class="flex flex-col gap-[20px]]">
            <span>Нет неактивных инструкторов</span>
            <a href="/instructors">Назад</a>
        </div>

    <?php endif; ?>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/resources/views/instructors/inactiveadd.blade.php ENDPATH**/ ?>